package com.example.mall.domain;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.example.mall.util.CodeGenerateUtils;

import java.io.Serializable;

/**
 * <p>
 * 库存盘点表
 * </p>
 *
 * @author whale
 * @since 2025-05-09
 */
@TableName("tb_inventory_audits")
public class InventoryAudits extends Model<InventoryAudits> {

    private static final long serialVersionUID = 1L;

    /**
     * 盘点记录唯一标识
     */
    @TableId("audit_id")
    private Long auditId;
    /**
     * 商品ID（关联商品表）
     */
    @TableField("product_id")
    private Long productId;
    /**
     * 规格ID（关联规格表，如果支持多规格）
     */
    @TableField("spec_id")
    private Long specId;
    /**
     * 盘点时的实际库存数量
     */
    @TableField("audit_stock")
    private Integer auditStock;
    /**
     * 系统记录的库存数量
     */
    @TableField("system_stock")
    private Integer systemStock;
    /**
     * 盘点状态（0：未完成，1：完成）
     */
    @TableField("audit_status")
    private Integer auditStatus;
    /**
     * 盘点人ID（关联用户表）
     */
    @TableField("audit_by")
    private Long auditBy;
    /**
     * 盘点时间
     */
    @TableField("audit_time")
    private Date auditTime;
    /**
     * 创建时间
     */
    @TableField("create_date")
    private Date createDate;
    /**
     * 更新时间
     */
    @TableField("update_date")
    private Date updateDate;

    public InventoryAudits() {
        this.auditId = Long.valueOf(CodeGenerateUtils.generateUniqueId());
    }

    public Long getAuditId() {
        return auditId;
    }

    public void setAuditId(Long auditId) {
        this.auditId = auditId;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public Long getSpecId() {
        return specId;
    }

    public void setSpecId(Long specId) {
        this.specId = specId;
    }

    public Integer getAuditStock() {
        return auditStock;
    }

    public void setAuditStock(Integer auditStock) {
        this.auditStock = auditStock;
    }

    public Integer getSystemStock() {
        return systemStock;
    }

    public void setSystemStock(Integer systemStock) {
        this.systemStock = systemStock;
    }

    public Integer getAuditStatus() {
        return auditStatus;
    }

    public void setAuditStatus(Integer auditStatus) {
        this.auditStatus = auditStatus;
    }

    public Long getAuditBy() {
        return auditBy;
    }

    public void setAuditBy(Long auditBy) {
        this.auditBy = auditBy;
    }

    public Date getAuditTime() {
        return auditTime;
    }

    public void setAuditTime(Date auditTime) {
        this.auditTime = auditTime;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    @Override
    public String toString() {
        return "InventoryAudits{" +
        ", auditId=" + auditId +
        ", productId=" + productId +
        ", specId=" + specId +
        ", auditStock=" + auditStock +
        ", systemStock=" + systemStock +
        ", auditStatus=" + auditStatus +
        ", auditBy=" + auditBy +
        ", auditTime=" + auditTime +
        ", createDate=" + createDate +
        ", updateDate=" + updateDate +
        "}";
    }
}
